<!DOCTYPE html>
<html class="<?php echo get_theme_option('Style Sheet'); ?>" lang="<?php echo get_html_lang(); ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php if ($description = option('description')): ?>
    <meta name="description" content="<?php echo $description; ?>">
    <?php endif; ?>

    <?php
    if (isset($title)) {$titleParts[] = strip_formatting($title);}
    $titleParts[] = option('site_title');
    ?>
    <title><?php echo implode(' &middot; ', $titleParts); ?></title>

    <?php echo auto_discovery_link_tags(); ?>

    <!-- Plugin Stuff -->
    <?php fire_plugin_hook('public_head', array('view'=>$this)); ?>

    <!-- Stylesheets -->
    <?php
    queue_css_url(WEB_ROOT.'/themes/longitudes/css/fontUbuntu.css');
    queue_css_file('normalize');
    queue_css_file('style');
    queue_css_file('tooltipster');
    queue_css_file('tooltipster-light');
    queue_css_file('tooltipster-shadow');
    echo head_css();
    ?>

    <!-- JavaScripts -->
    <?php
    queue_js_file('vendor/modernizr');
    queue_js_file('vendor/selectivizr');
    queue_js_file('jquery-extra-selectors');
    queue_js_file('vendor/respond');
    queue_js_file('globals');
    queue_js_file('jquery.tooltipster.min');
    queue_js_string("
$(document).ready(function() {
  $('.tooltip').tooltipster({
    theme: 'tooltipster-shadow',
    contentAsHTML: true,
    interactive: true,
    position: 'bottom'
  });
  $('.tooltipajax').tooltipster({
    contentAsHTML: true,
    interactive: true,
    content: 'Loading...',
    theme: 'tooltipster-shadow',
    position: 'top',
    functionBefore: function(origin, continueTooltip) {
      // we ll make this function asynchronous and allow the tooltip to go ahead and show the loading notification while fetching our data
      continueTooltip();
      // next, we want to check if our data has already been cached
      if (origin.data('ajax') !== 'cached') {
        $.ajax({
          type: 'POST',
          url: '".WEB_ROOT."/tooltip/get/dbpedia?url='+$(this).attr('href'),
          success: function(data) {origin.tooltipster('content', data).data('ajax', 'cached');}
        });
      }
    }
  });
  $(function () {
    //back to top
    $('#back-to-top').click(function(){
      $('body,html').animate({scrollTop:0},1000);
      return false;
    });
  });
});
");
    echo custom_head_js();
    ?>
</head>

<?php echo body_tag(array('id' => @$bodyid, 'class' => @$bodyclass)); ?>
<?php fire_plugin_hook('public_body', array('view'=>$this)); ?>
  <div id="wrap">
    <header>
      <div id="site-title"><?php echo link_to_home_page(theme_logo()); ?></div>
      <div id="search-container">
        <form id="search-form" name="search-form" action="<?php echo WEB_ROOT ?>/search" method="get">
          <input type="text" name="query" id="query" value="<?php if(isset($_GET['query'])) echo $_GET['query'] ?>" title="Recherche">
          <fieldset id="advanced-form">
            <a href="<?php echo WEB_ROOT ?>/items/search">Recherche avancée</a><br/>
            <a href="<?php echo WEB_ROOT ?>/items/tags">Parcourir par mot-clé</a><br/>
            <a href="<?php echo WEB_ROOT ?>/items/map">Parcourir la carte</a><br/>
            <a href="<?php echo WEB_ROOT ?>/items/">Tous les contenus</a><br/>
          </fieldset>
          <input type="submit" name="" value="">
        </form>
      </div>
      <?php fire_plugin_hook('public_header', array('view'=>$this)); ?>
    </header>
        <nav class="top">
          <?php //echo public_nav_main(); ?>
          <ul class="navigation">
              <li>
                  <a href="<?php echo WEB_ROOT ?>/" id="nav-accueil">Accueil</a>
              </li>
              <li>
                  <a href="<?php echo WEB_ROOT ?>/items/browse" id="nav-contenus">Contenus</a>
              </li>
              <li>
                  <a href="<?php echo WEB_ROOT ?>/collection-tree" id="nav-collections">Collections</a>
              </li>
              <li>
                  <a href="<?php echo WEB_ROOT ?>/geolocation/map/browse" id="nav-carte">Carte</a>
              </li>
              <li>
                  <a href="<?php echo WEB_ROOT ?>/exhibits" id="nav-expositions">Expositions</a>
              </li>
              <li>
                  <a href="<?php echo WEB_ROOT ?>/a-propos" id="nav-a-propos">À propos</a>
              </li>
          </ul>
        </nav>
    <script>
    $(document).ready(function() {
      $('#nav-collections').tooltipster({
        content: $('<?php echo custom_collectionTreeFullList() ?>'),
        interactive: true,
        position: 'bottom'
      });
    });
    </script>
        <div id="content">
